export const sortableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 6,
  sortable: true,
  addBtn: false,
  editBtn: false,
  delBtn: false,
  menu: true,
  searchBtn: false,
  emptyBtn: false,
  searchEnter: true,
  column: [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
    },
    {
      type: "input",
      label: "品号",
      prop: "itemCode",
      span: 12,
    },
    {
      type: "select",
      label: "车间",
      prop: "workshopId",
      span: 12,
      dicUrl: "/admin-api/o3-pfoc/workshop/getWorkshopList",
      dicMethod: "get",
      props: {
        label: "workshopName",
        value: "id",
      },
    },
    {
      type: "select",
      label: "产线",
      prop: "productionLineId",
      span: 12,
      display: false,
      hide: false,
      dicUrl: "/admin-api/o3-pfoc/realityproductlinemain/getLineList",
      props: {
        label: "realityLineName",
        value: "id",
      },
      dicMethod: "get",
    },
    {
      type: "input",
      label: "排产数量",
      prop: "scheduleNum",
      span: 12,
    },
    {
      type: "datetime",
      label: "开工时间",
      prop: "startDate",
      span: 12,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
    },
    {
      type: "input",
      label: "标准产量",
      prop: "capacity",
      span: 12,
    },
    {
      type: "input",
      label: "日完成量",
      prop: "dailyCompleteQty",
      span: 12,
    },
    {
      type: "datetime",
      label: "完成时间",
      prop: "completeTime",
      span: 12,
      width: 90,
      format: "yyyy-MM-dd hh:mm:ss",
      valueFormat: "yyyy-MM-dd hh:mm:ss",
    },
    {
      type: "input",
      label: "剩余数量",
      prop: "remainingQty",
      span: 12,
      value: 0,
    },
    {
      type: "input",
      label: "已完成量",
      prop: "completeQty",
      span: 12,
      value: 0,
    },
    {
      type: "datetime",
      label: "入库时间",
      prop: "storeDate",
      span: 12,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
    },
    {
      type: "select",
      label: "工单状态",
      prop: "moStatus",
      span: 12,
      dicUrl: "/admin-api/system/dict-data/type?type=workorder_status",
      props: {
        label: "label",
        value: "value",
      },
      dicMethod: "get",
      html: true, //配置html设置为true即可支持formatter转义html代码
      formatter: (val) => {
        if (val.moStatus == "未生产") {
          return '<b style="color:red">未生产</b>';
        } else if (val.moStatus == "生产中") {
          return '<b style="color:green">生产中</b>';
        } else if (val.moStatus == "暂停中") {
          return '<b style="color:orange">暂停中</b>';
        } else if (val.moStatus == "已完工") {
          return '<b style="color:rgba(68,68,68,0.73)">已完工</b>';
        }
      },
    },
  ],
};

/*
export const sortableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 6,
  sortable:true,
  addBtn:false,
  editBtn:false,
  delBtn:false,
  menu:true,
  searchBtn:false,
  emptyBtn:false,
  column: [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12
    },
    {
      type: "input",
      label: "品号",
      prop: "itemCode",
      span: 12
    },
    {
      type:"select",
      label: "产线",
      prop: "lineId",
      search:true,
      searchslot:true,
      span: 12,
      display: false,
      hide:true,
      dicUrl: '/admin-api/o3-pfoc/realityproductlinemain/getLineList',
      props: {
        label: "realityLineName",
        value: "id"
      },
      dicMethod: "get",
      searchSpan:6
    },
    {
      type: "select",
      label: "工单状态",
      prop: "moStatus",
      span: 12,
      dicUrl: '/admin-api/system/dict-data/type?type=workorder_status',
      props: {
        label: "label",
        value: "value"
      },
      dicMethod: "get",
      html:true,//配置html设置为true即可支持formatter转义html代码
      formatter:(val) => {
        if( val.moStatus=='未生产') {
          return '<b style="color:red">未生产</b>'
        }else if(val.moStatus=='生产中'){
          return '<b style="color:green">生产中</b>'
        }else if(val.moStatus=='暂停中'){
          return '<b style="color:orange">暂停中</b>'
        }else if(val.moStatus=='已完工'){
          return '<b style="color:rgba(68,68,68,0.73)">已完工</b>'
        }else if(val.moStatus=='已发料'){
          return '<b style="color:rgba(221,31,132,0.73)">已发料</b>'
        }
      }
    },
    {
      type: "input",
      label: "报废数量",
      prop: "scrapQty",
      span: 12,
      formatter:(val,value,label)=>{
        val.scrapQty=Number(val.scrapQty)
        return val.scrapQty
      }
    },
    {
      type: "input",
      label: "完成数量",
      prop: "completedQty",
      span: 12,
      formatter:(val,value,label)=>{
        val.completedQty=Number(val.completedQty)
        return val.completedQty
      }
    },
    {
      type: "input",
      label: "申请数量",
      prop: "reqQty",
      span: 12,
      formatter:(val,value,label)=>{
        val.reqQty=Number(val.reqQty)
        return val.reqQty
      }
    },
    {
      type: "input",
      label: "预计产量",
      prop: "planQty",
      span: 12,
      formatter: (val, value, label) => {
        val.planQty = Number(val.planQty)
        return val.planQty
      }
    },
    {
      type: "datetime",
      label: "批准日期",
      prop: "approvedate",
      span: 12,
      format: "yyyy-MM-dd HH:mm:ss",
      valueFormat: "yyyy-MM-dd HH:mm:ss"
    },
    /!*{
      type: "datetime",
      label: "完工时间",
      prop: "actualCompleteDate",
      span: 12,
      format: "yyyy-MM-dd HH:mm:ss",
      valueFormat: "yyyy-MM-dd HH:mm:ss"
    },
    {
      type:"select",
      label: "分配状态",
      prop: "distributeStatus",
      span: 12,
      display: false,
      hide:false,
      dicData:[
        {
          label:'未分配',
          value:'未分配'
        },{
          label:'已分配',
          value:'已分配'
        }
      ],
      html:true,//配置html设置为true即可支持formatter转义html代码
      formatter:(val) => {
        if( val.distributeStatus=='未分配') {
          return '<b style="color:red">未分配</b>'
        }else{
          return '<b style="color:green">已分配</b>'
        }
      },
    },*!/
  ]
}
*/
